home *** CD-ROM | disk | FTP | other *** search
- /*
- * CBLibrary - SprFormats
- * Copyright (C) 2003 Chris Bazley
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
- /* Sprite area data structures & constants */
-
- #ifndef SprFormats_h
- #define SprFormats_h
-
- /* Modifiers for OS_SpriteOp reason code (add one) */
- #define SPRITEOP_SYSTEMAREA 0
- #define SPRITEOP_USERAREA_SPRNAME (1u << 8)
- #define SPRITEOP_USERAREA_SPRPTR (1u << 9)
-
- /* Error numbers */
- #define SPRITE_ERR_CREATEMEM 0x82
- #define SPRITE_ERR_MEMORY 0x85
- #define SPRITE_ERR_DOESNTEXIST 0x86
-
- /* OS_SpriteOp reason codes */
- #define SPRITEOP_READCTRLBLOCK 8
- #define SPRITEOP_INIT_AREA 9
- #define SPRITEOP_LOAD_AREA 10
- #define SPRITEOP_MERGE_AREA 11
- #define SPRITEOP_SAVE_AREA 12
- #define SPRITEOP_GET_SPR 14
- #define SPRITEOP_CREATE 15
- #define SPRITEOP_GET_SPR_COORDS 16
- #define SPRITEOP_VERIFY_AREA 17
- #define SPRITEOP_DELETE 25
- #define SPRITEOP_PLOT 28
- #define SPRITEOP_CREATE_MASK 29
- #define SPRITEOP_PLOTCOORDS 34
- #define SPRITEOP_SETPTRSHAPE 36
- #define SPRITEOP_READINFO 40
- #define SPRITEOP_READPIXCOL 41
- #define SPRITEOP_PLOTSCALED 52
- #define SPRITEOP_SWITCHOUTPUT_SPRITE 60
- #define SPRITEOP_SWITCHOUTPUT_MASK 61
-
- typedef struct
- { int size;
- int sprite_count;
- int first;
- int used;
- int extension_words[];
- } spriteareaheader;
-
- typedef struct
- { int size;
- char name[12];
- int width;
- int height;
- int left_bit;
- int right_bit;
- int image;
- int mask;
- int type;
- int palette_data[];
- } spriteheader;
-
- #endif
-